home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / netzwerk / magplip / s / build-aminet
AmigaDOS Script File  |  1996-02-26  |  3KB  |  92 lines

  1. .key RELEASENAME/A,BASENAME/A,SOURCE/A,ROOT/A,AUTHOR/A,UPLOADER/A,SHORT/A,TYPE/A,CLEAN/S
  2. .bra {
  3. .ket }
  4. ;
  5. ; $VER: build-aminet 37.5 (30 Jul 1995)
  6. ;
  7. ; (C) Copyright 1995 Marius Gröger
  8. ;     All Rights Reserved.
  9. ;
  10. ; AmigaShell script to create an Aminet release. From a bumprev file
  11. ; the current release number is extracted and used to form the
  12. ; proper readme and archive names. The following directory structure
  13. ; and files are assumed to exist:
  14. ;
  15. ;    CWD/{BASENAME}_rev.h   ·  see C= SWTools/bumprev
  16. ;    CWD/{SOURCE}           ·  a body text for an Aminet readme
  17. ;    {BASENAME}             ·  name of distribution directory
  18. ;    {ROOT}                 ·  distribution root directory
  19. ;    {ROOT}/../{BASENAME}   ·  -> implicitely, must be valid
  20. ;
  21. ; The options in detail:
  22. ;
  23. ;    RELEASENAME
  24. ;        Unfortunately, the filing system used for Aminet CDs is only
  25. ;        capable of mainaining file names up to 21 characters length.
  26. ;        This parameter takes care of this: ideally meaning the same as
  27. ;        BASENAME, it should by an acronym for it.
  28. ;
  29. ;    BASENAME
  30. ;        Basename of the distribution.
  31. ;        A file $(BASENAME)_rev.h as created by bumprev must exist.
  32. ;
  33. ;    SOURCE
  34. ;        Source file which contains the readme body text. The Aminet header
  35. ;        infos will be prepended.
  36. ;
  37. ;    ROOT
  38. ;        Distribution root directory. Here goes the readme to, and this is
  39. ;        what will be archived.
  40. ;
  41. ;    AUTHOR, UPLOADER, SHORT, TYPE
  42. ;        Texts as required for Aminet contributions.
  43. ;
  44. ;    CLEAN
  45. ;        If set, previous readmes are deleted.
  46. ;
  47. ;
  48. ; $HISTORY:
  49. ;
  50. ; 30 Jul 1995 : 037.005 :  must also remove .o files from archive
  51. ; 25 Jul 1995 : 037.004 :  didn't remove obsolete readme's due to typo
  52. ; 02 Jul 1995 : 037.003 :  hardcoded "rel" drawer was unfortunate, now using
  53. ;                          {RELEASENAME}
  54. ; 27 Jun 1995 : 037.002 :  takes care for Aminet file name restrictions
  55. ; 03 Jun 1995 : 037.001 :  initial
  56. ;
  57.  
  58. ; --------------------- customize this -----------------------
  59. Set LHA  C:Lha
  60. Set TAR  C:tar
  61. ; ----------------- end of customization ---------------------
  62.  
  63. If EQ "CLEAN" {CLEAN}
  64.    Echo "=== removing obsolete readme's ==="
  65.    Delete QUIET "{ROOT}/{RELEASENAME}(%|[0-9])[0-9].[0-9](%|[0-9])(%|[0-9]).readme"
  66. Endif
  67.  
  68. If NOT EXISTS T:{RELEASENAME}
  69.   Makedir T:{RELEASENAME}
  70. EndIf
  71. Delete QUIET T:{RELEASENAME}/#?
  72.  
  73. Set relname "`version file {BASENAME}_rev.h`"
  74. Set relname {RELEASENAME}`rx "say word('$relname',2)"`
  75. Echo >{ROOT}/$relname.readme "Short:    {SHORT}*NAuthor:   {AUTHOR}*NUploader: {UPLOADER}*NType:     {TYPE}*N"
  76. Type {SOURCE} >>{ROOT}/$relname.readme
  77. Copy {ROOT}/$relname.readme T:{RELEASENAME}/
  78.  
  79. Echo "=== creating lha archive ==="
  80. $LHA a -rw T:{RELEASENAME}/$relname.lha {ROOT}/// {BASENAME} {BASENAME}.info
  81. $LHA d T:{RELEASENAME}/$relname.lha #?.(o|no|opt0[0-4]0)
  82.  
  83. Echo "=== creating tar archive ==="
  84. $TAR cvCf t: t:{RELEASENAME}.tar {RELEASENAME}
  85.  
  86. UnSet relname
  87. UnSet TAR
  88. UnSet LHA
  89.  
  90. Echo "=== ready ==="
  91.  
  92.